/*
 Navicat Premium Data Transfer

 Source Server         : 106.14.188.200
 Source Server Type    : MySQL
 Source Server Version : 50720
 Source Host           : 106.14.188.200
 Source Database       : givename

 Target Server Type    : MySQL
 Target Server Version : 50720
 File Encoding         : utf-8

 Date: 09/13/2018 19:07:23 PM
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
--  Table structure for `user_bonus_info`
-- ----------------------------
DROP TABLE IF EXISTS `user_bonus_info`;
CREATE TABLE `user_bonus_info` (
  `bonus_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '红包ID',
  `open_id` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '微信ID',
  `user_id` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '用户ID',
  `win_money` double(10,2) DEFAULT '0.00' COMMENT '红包金额',
  `win_status` char(1) COLLATE utf8_bin DEFAULT NULL COMMENT '红包中奖状态0 未中奖 1中奖',
  `withdraw_status` char(1) COLLATE utf8_bin DEFAULT NULL COMMENT '提现状态0未提，1提现中2体现成功3体现失败4过期未提',
  `win_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '抽奖时间',
  `withdraw_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '提现时间中期起24个小时未提自动过期',
  `add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '开始时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`bonus_id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `user_bonus_info`
-- ----------------------------
BEGIN;
INSERT INTO `user_bonus_info` VALUES ('1', '12334444', null, '21.23', '1', '2', '2018-09-13 09:39:10', '2018-09-13 09:39:10', '2018-09-13 09:39:10', '2018-09-13 09:39:10'), ('2', '1', null, '21.29', '1', '0', '2018-09-13 17:24:53', '2018-09-13 17:24:53', '2018-09-13 17:24:53', '2018-09-13 17:24:53'), ('3', '1', null, '2.97', '1', '0', '2018-09-13 17:24:51', '2018-09-13 17:24:51', '2018-09-13 17:24:51', '2018-09-13 17:24:51'), ('4', '1', null, '17.32', '1', '0', '2018-09-13 17:24:39', '2018-09-13 17:24:39', '2018-09-13 17:24:39', '2018-09-13 17:24:39'), ('6', '4', null, '4.73', '1', '0', '2018-09-13 17:24:41', '2018-09-13 17:24:41', '2018-09-13 17:24:41', '2018-09-13 17:24:41'), ('7', '10', null, '27.91', '1', '0', '2018-09-13 17:24:42', '2018-09-13 17:24:42', '2018-09-13 17:24:42', '2018-09-13 17:24:42'), ('8', '3', null, '7.96', '1', '0', '2018-09-13 17:24:48', '2018-09-13 17:24:48', '2018-09-13 17:24:48', '2018-09-13 17:24:48'), ('9', '', null, '0.37', '0', '0', '2018-09-13 17:24:45', '2018-09-13 17:24:45', '2018-09-13 17:24:45', '2018-09-13 17:24:45'), ('10', '', null, '36.47', '0', '0', '2018-09-13 09:09:25', '2018-09-13 09:09:25', '2018-09-13 09:09:25', '2018-09-13 09:09:25'), ('11', '', null, '2.52', '0', '0', '2018-09-13 09:09:24', '2018-09-13 09:09:24', '2018-09-13 09:09:24', '2018-09-13 09:09:24'), ('12', '', null, '1.40', '0', '0', '2018-09-13 09:09:23', '2018-09-13 09:09:23', '2018-09-13 09:09:23', '2018-09-13 09:09:23'), ('13', '', null, '24.98', '0', '0', '2018-09-13 09:09:21', '2018-09-13 09:09:21', '2018-09-13 09:09:21', '2018-09-13 09:09:21'), ('14', '', null, '21.81', '0', '0', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 21:53:53'), ('15', '', null, '18.32', '0', '0', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 21:53:54'), ('16', '', null, '22.80', '', '0', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 19:53:45'), ('17', '', null, '2.39', '', '0', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 19:53:44'), ('18', '', null, '19.35', '', '0', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 19:53:39'), ('19', '', null, '5.24', '', '0', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 19:53:41'), ('20', ' ', null, '26.19', '', '0', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 02:59:51', '2018-09-13 19:53:42');
COMMIT;

-- ----------------------------
--  Table structure for `user_info`
-- ----------------------------
DROP TABLE IF EXISTS `user_info`;
CREATE TABLE `user_info` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `open_id` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '微信ID',
  `nickname` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '昵称',
  `sex` char(1) COLLATE utf8_bin DEFAULT NULL COMMENT '性别（1-男，0-女）',
  `country` varchar(8) COLLATE utf8_bin DEFAULT NULL COMMENT '国家代码',
  `province` varchar(8) COLLATE utf8_bin DEFAULT NULL COMMENT '省',
  `city` varchar(8) COLLATE utf8_bin DEFAULT NULL COMMENT '市',
  `head_img_url` varchar(64) COLLATE utf8_bin DEFAULT NULL COMMENT '头像',
  `create_date` timestamp NULL DEFAULT NULL COMMENT '关注日期',
  `cancel_date` timestamp NULL DEFAULT NULL COMMENT '取消关注日期',
  `phone` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '手机号码',
  `phone_code` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '验证码',
  `auth_status` char(1) COLLATE utf8_bin DEFAULT NULL COMMENT '授权状态0（否默认）1（是）',
  `bind_status` char(1) COLLATE utf8_bin DEFAULT NULL COMMENT '绑定状态0（否默认）1（是',
  `attention_status` char(1) COLLATE utf8_bin DEFAULT NULL COMMENT '关注状态0（否）1（是默认）',
  `add_time` timestamp NULL DEFAULT NULL COMMENT '开始时间',
  `update_time` timestamp NULL DEFAULT NULL COMMENT '更新时间',
  `status` char(1) COLLATE utf8_bin DEFAULT NULL COMMENT '用户状态',
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=10006 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `user_info`
-- ----------------------------
BEGIN;
INSERT INTO `user_info` VALUES ('10000', '12334444', '甘肃电信地表最强', '1', '北京', '北京', '北京', 'https://oss.aliyuncs.com/aliyun_id_photo_bucket/default_colleagu', '2018-09-02 10:28:21', '2018-09-02 10:28:09', '18987517052', '01235', '1', '0', '1', '2018-09-01 23:09:55', '2018-09-01 23:09:58', '1'), ('10001', '1', '你是最强的', '1', '北京', '北京', '北京', 'https://oss.aliyuncs.com/aliyun_id_photo_bucket/default_colleagu', '2018-09-11 17:24:52', '2018-09-11 17:24:54', '18987656765', '22344', '1', null, null, null, null, null), ('10002', '2', '是的 甘肃', '1', '北京', '北京', '北京', 'https://oss.aliyuncs.com/aliyun_id_photo_bucket/default_colleagu', '2018-09-11 17:24:52', '2018-09-11 17:24:54', '18987656765', null, '1', null, null, null, null, null), ('10003', '3', '甘肃很强 ', '1', '北京北京', '北京', '北京', 'https://oss.aliyuncs.com/aliyun_id_photo_bucket/default_colleagu', '2018-09-11 17:24:52', '2018-09-11 17:24:54', '18987656765', null, '1', null, null, null, null, null), ('10004', '4', '就选你了', '1', '北京', '北京', '北京', 'https://oss.aliyuncs.com/aliyun_id_photo_bucket/default_colleagu', '2018-09-11 17:24:52', '2018-09-11 17:24:54', '18987656765', null, '1', null, null, null, null, null), ('10005', '5', '唉 不知道是啥', '0', '北京', '北京', '北京', 'https://oss.aliyuncs.com/aliyun_id_photo_bucket/default_colleagu', '2018-09-11 17:24:52', '2018-09-11 17:24:54', '18987656765', null, '1', null, null, null, null, null);
COMMIT;

-- ----------------------------
--  Table structure for `user_named_info`
-- ----------------------------
DROP TABLE IF EXISTS `user_named_info`;
CREATE TABLE `user_named_info` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '命名ID',
  `user_id` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '用户ID',
  `open_id` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '微信ID',
  `name` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '名称',
  `vote_count` int(10) DEFAULT NULL COMMENT '当前票数',
  `status` char(1) COLLATE utf8_bin DEFAULT NULL COMMENT '审核状态（0审核中，1通过，2失败。）',
  `add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '开始时间',
  `update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=131 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

-- ----------------------------
--  Records of `user_named_info`
-- ----------------------------
BEGIN;
INSERT INTO `user_named_info` VALUES ('1', '10000', '12334444', '甘肃电信', '3', '1', '2018-09-09 15:49:39', '2018-09-09 15:49:39'), ('100', null, '1', '中国电信,电信中国', '51', '1', '2018-09-12 18:44:15', '2018-09-12 22:30:39'), ('101', null, '2', '**电信,电信**', '100', '1', '2018-09-12 18:44:13', '2018-09-12 18:44:13'), ('102', null, '3', '电信吗', '30', '1', '2018-09-12 18:44:21', '2018-09-12 18:44:21'), ('115', null, '4', '哎呀', '10', '1', '2018-09-12 18:44:26', '2018-09-12 18:44:26'), ('116', null, '5', '2344', '20', '1', '2018-09-12 18:44:30', '2018-09-12 18:44:30'), ('117', null, '3', '哈哈哈', '0', '1', '2018-09-12 18:52:02', '2018-09-12 18:52:02'), ('118', null, '2', '2344', '0', '1', '2018-09-12 18:52:08', '2018-09-12 18:52:08'), ('119', null, '4', '你们好', '1', '1', '2018-09-12 18:52:11', '2018-09-13 09:50:40'), ('120', null, '123', '2344', '1', '1', '2018-09-02 16:15:48', '2018-09-02 16:15:48'), ('121', null, '123', '嘿嘿嘿', '0', '1', '2018-09-08 22:31:52', '2018-09-08 22:31:52'), ('122', null, '123', '2344', '1', '1', '2018-09-02 16:16:22', '2018-09-12 16:32:45'), ('123', null, '22', '最新的', '0', '1', '2018-09-12 22:41:14', '2018-09-12 22:41:14'), ('124', null, '22', '最新的', '0', '1', '2018-09-12 22:41:19', '2018-09-12 22:41:19'), ('125', null, '22', '最新的', '0', '0', '2018-09-12 22:46:33', '2018-09-12 22:46:33'), ('126', null, '12334444', '时间就是就是就是', '0', '0', '2018-09-13 17:03:24', '2018-09-13 17:03:24'), ('127', null, '12334444', '时间就是就是就是', '0', '0', '2018-09-13 17:03:44', '2018-09-13 17:03:44'), ('128', null, '12334444', '时间就是就是就是', '0', '0', '2018-09-13 17:03:56', '2018-09-13 17:03:56'), ('129', null, '12334444', '时间就是就是就是', '0', '0', '2018-09-13 17:10:22', '2018-09-13 17:10:22'), ('130', null, '12334444', '时间就是就是就是', '0', '0', '2018-09-13 17:11:26', '2018-09-13 17:11:26');
COMMIT;

-- ----------------------------
--  Table structure for `user_share_info`
-- ----------------------------
DROP TABLE IF EXISTS `user_share_info`;
CREATE TABLE `user_share_info` (
  `share_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '分享记录ID',
  `open_id` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '微信ID',
  `user_id` varchar(16) COLLATE utf8_bin DEFAULT NULL COMMENT '用户ID',
  `share_type` char(1) COLLATE utf8_bin DEFAULT NULL COMMENT '类型0 微信好友，1，微信群，2朋友圈',
  `share_type_name` varchar(8) COLLATE utf8_bin DEFAULT NULL COMMENT '名称',
  `add_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '分享时间',
  PRIMARY KEY (`share_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

SET FOREIGN_KEY_CHECKS = 1;
